package com.d0330;

public class Account {
    private int account;
    private int pwd;
    private double balance;

    public Account() {
    }

    public Account(int account, int pwd, Double balance) {
        this.account = account;
        this.pwd = pwd;
        this.balance = balance;
    }

    public int getAccount() {
        return account;
    }

    public void setAccount(int account) {
        this.account = account;
    }

    public int getPwd() {
        return pwd;
    }

    public void setPwd(int pwd) {
        this.pwd = pwd;
    }

    public double getBalance() {
        return balance;
    }

    public void setBalance(Double balance) {
        this.balance = balance;
    }
    public  Double save(double save){
        balance=balance+save;
        return balance;
    }

    @Override
    public String toString() {
        return "Account{" +
                "account=" + account +
                ", pwd=" + pwd +
                ", balance=" + balance +
                '}';
    }
}
